/*-------------------------------------------------------------------------

***************** Modification History ***********************************
   @doc
   @module ICT.h - ISDN Configuration Table Header file |
   @end
   
$Log: /SoftPay/SPK2SIM/Source/Include/ict.h $ 
 * 
 * 3     2/21/00 3:00p Jim_b4
 * Include file restructuring
 * 
 * 2     11/30/99 3:23p Kevin_v1
 * Removed File Name Message file usage
 * 
 * 1     11/17/99 4:34p Kevin_v1
 * 
 * 2     9/13/99 1:58p Chris_s1
 * Re-arrange bit fields for SDS compiler...
 * 
 * 1     7/19/99 5:32p Jim_b4
 * 
 * 1     7/19/99 4:10p Jim_b4
 * 
 * 4     7/01/99 4:23p Monique_b1
 * Added padded bits
 * 
 * 3     6/22/99 5:32p Nick_t1
 * 
 * 2     6/09/99 11:18a Monique_b1
 * Change headers and file names for SP 2000
**************************************************************************

   Copyright (C) 1999 by VeriFone, Inc.

   All rights reserved.  No part of this software may be reproduced,
   transmitted, transcribed, stored in a retrieval system, or translated
   into any language or computer language, in any form or by any means,
   electronic, mechanical, magnetic, optical, chemical, manual or otherwise,
   without the prior written permission of VeriFone, Inc.

---------------------------------------------------------------------------*/

#ifndef VSICT_H
#define VSICT_H

#include <sizes.h>
#include <comm.h>

#define ICT_FILE_NAME	      "ict.dat"

typedef struct TagICT_REC
{
    short       shAuthMode;                     /* ISDN Mode Type for Authorizations */
    char        szAuthX28SignalData[ISDN_ADDRESS_LENGTH+1];/* X.28 Signals Data */
    char        szAuthSecRouteAddr[ISDN_ADDRESS_LENGTH+1];/* Secondary Routing Address for Auths */
    short       shSettleMode;                   /* ISDN Mode Type for Settlement */
    char        szSettleX28SignalData[ISDN_ADDRESS_LENGTH+1];/* X.28 Signals Data */
    char        szSettleSecRouteAddr[ISDN_ADDRESS_LENGTH+1];/* Secondary Routing Address for Settle */
    short       shTestMode;                     /* ISDN Mode Type for Test Transaction */
    char        szTestX28SignalData[ISDN_ADDRESS_LENGTH+1];/* X.28 Signals Data */
    char        szTestSecRouteAddr[ISDN_ADDRESS_LENGTH+1];/* Secondary Routing Address for Test */
    char        szIOPort[COM_PORT_SIZE+1];      /* 1-3, 5/P; com1, com2, com3, pinpad */
    short       shBaudRate;                     /* RS-232 Communications Baud Rate 
                                                    (3=2400, 5=9600, as defined in DEVICE.H) */
    short       shDataFormat;                   /* RS-232 Communications Data Format
                                                    (0=7E1, 4=8N1, as defined in DEVICE.H) */
	short       shProtocolMode;                 /* char, packet, visa1, etc    */
    short       shSynTimeout;                   /* Sync Character RxTimeout in seconds */
    short       shEnqTimeout;                   /* ENQ Character RxTimeout in seconds */
    short       shAckTimeout;                   /* ACK Character Rx Timeout in seconds */
    short       shInterCharTO;                  /* Inter Character Rx Timeout in approx. 50 ms increments */


#ifdef _WINDOWS
    int    fTestAuthEnabled  : 1;    /* Allow Test Auth Transaction */
	int    f1                : 1;    /* padded bits */
	int    f2                : 1;    /* padded bits */
	int    f3                : 1;    /* padded bits */
	int    f4                : 1;    /* padded bits */
	int    f5                : 1;    /* padded bits */
	int    f6                : 1;    /* padded bits */
	int    f7                : 1;    /* padded bits */
	int    f8                : 1;    /* padded bits */
	int    f9                : 1;    /* padded bits */
	int    f10               : 1;    /* padded bits */
	int    f11               : 1;    /* padded bits */
	int    f12               : 1;    /* padded bits */
	int    f13               : 1;    /* padded bits */
	int    f14               : 1;    /* padded bits */
	int    f15               : 1;    /* padded bits */
#else
	int    f15               : 1;    /* padded bits */
	int    f14               : 1;    /* padded bits */
	int    f13               : 1;    /* padded bits */
	int    f12               : 1;    /* padded bits */
	int    f11               : 1;    /* padded bits */
	int    f10               : 1;    /* padded bits */
	int    f9                : 1;    /* padded bits */
	int    f8                : 1;    /* padded bits */
	int    f7		        : 1;	/* Bit Padding */
	int    f6				: 1;	/* Bit Padding */
	int    f5				: 1;	/* Bit Padding */
    int    f4				: 1;	/* Bit Padding */
    int    f3				: 1;	/* Bit Padding */
    int    f2				: 1;	/* Bit Padding */
	int    f1				: 1;	/* Bit Padding */
    int    fTestAuthEnabled  : 1;    /* Allow Test Auth Transaction */
#endif


} ICT_REC;

#define SIZE_ICT_REC  sizeof(ICT_REC)

#define fISDN()                         (obCommunication.inLinkType == ISDN_COMM)

#endif
